package com.business.business.util;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
//import org.apache.tomcat.util.codec.binary.Base64;

import java.security.MessageDigest;

public class MD5util {

    public static String getMD5Str(String strValue) throws Exception {
        MessageDigest md5 = MessageDigest.getInstance("MD5");
        String newstr = Base64.encode(md5.digest(strValue.getBytes()));
        return newstr;
    }

    public static void main(String[] args) throws Exception{
        System.out.println(getMD5Str("123456"));

    }
}
